<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The HRTime\StopWatch class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="hrtime-performancecounter.gettickssince.html">« HRTime\PerformanceCounter::getTicksSince</a></li>
      <li style="float: right;"><a href="hrtime-stopwatch.getelapsedticks.html">HRTime\StopWatch::getElapsedTicks »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.hrtime.html">HRTime</a></li>
    <li>The HRTime\StopWatch class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.hrtime-stopwatch" class="reference">

 <h1 class="title">The HRTime\StopWatch class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL hrtime &gt;= 0.4.3)</p>


  <div class="section" id="hrtime-stopwatch.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="hrtime-stopwatch.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">HRTime\StopWatch</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.hrtime-performancecounter.html" class="classname">HRTime\PerformanceCounter</a>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.getelapsedticks.html" class="methodname">getElapsedTicks</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.getelapsedtime.html" class="methodname">getElapsedTime</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$unit</code><span class="initializer"> = ?</span></span>): <span class="type">float</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.getlastelapsedticks.html" class="methodname">getLastElapsedTicks</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.getlastelapsedtime.html" class="methodname">getLastElapsedTime</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$unit</code><span class="initializer"> = ?</span></span>): <span class="type">float</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.isrunning.html" class="methodname">isRunning</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.start.html" class="methodname">start</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="hrtime-stopwatch.stop.html" class="methodname">stop</a></span>(): <span class="type"><span class="type void">void</span></span></div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="hrtime-performancecounter.getfrequency.html" class="methodname">HRTime\PerformanceCounter::getFrequency</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="hrtime-performancecounter.getticks.html" class="methodname">HRTime\PerformanceCounter::getTicks</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="hrtime-performancecounter.gettickssince.html" class="methodname">HRTime\PerformanceCounter::getTicksSince</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$start</code></span>): <span class="type">int</span></div>


   }</div>


  </div>

 </div>

 

















































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="hrtime-stopwatch.getelapsedticks.html">HRTime\StopWatch::getElapsedTicks</a> — Get elapsed ticks for all intervals</li><li><a href="hrtime-stopwatch.getelapsedtime.html">HRTime\StopWatch::getElapsedTime</a> — Get elapsed time for all intervals</li><li><a href="hrtime-stopwatch.getlastelapsedticks.html">HRTime\StopWatch::getLastElapsedTicks</a> — Get elapsed ticks for the last interval</li><li><a href="hrtime-stopwatch.getlastelapsedtime.html">HRTime\StopWatch::getLastElapsedTime</a> — Get elapsed time for the last interval</li><li><a href="hrtime-stopwatch.isrunning.html">HRTime\StopWatch::isRunning</a> — 确认测量是否在运行</li><li><a href="hrtime-stopwatch.start.html">HRTime\StopWatch::start</a> — Start time measurement</li><li><a href="hrtime-stopwatch.stop.html">HRTime\StopWatch::stop</a> — Stop time measurement</li></ul>
</div>
</div></div></body></html>